<template>
	<view >
		<view style="width: 92%;margin: 20rpx auto;">
			<input v-model="mobile" type="number"   style="width: 100%;height: 90rpx;line-height: 90rpx;color: #666666;box-sizing: border-box;padding: 0 30rpx;font-size: 28rpx;background-color: #FFFFFF;border-radius: 45rpx;" placeholder="请输入员工手机号" />
		</view>
		<view @click="tianjia" style="width: 92%;height: 80rpx;line-height: 80rpx;border-radius: 40rpx;text-align: center;font-size: 28rpx;color: #FFFFFF;background-color: #1fb0ac;margin: 120rpx auto 20rpx;">
			确认
		</view>
		<view style="text-align: center;line-height: 60rpx;color: red;font-size: 28rpx;">
			{{msg || ''}}
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				mobile:'',
				msg:''
			}
		},
		methods:{
			tianjia:function(){
				this.post('api/firm/add_user',{mobile:this.mobile},true).then(res=>{
					console.log(res)
					if(res.code==1){
						this.msg=res.msg
						// uni.showToast({
						// 	title: res.msg,
						// 	icon: "none",
						// 	duration: 1000
						// })
						// setTimeout(function(){
						// 	uni.navigateBack({
						// 		delta:1
						// 	})
						// },1500)
					}else{
						this.msg=res.msg
						// uni.showToast({
						// 	title: res.msg,
						// 	icon: "none",
						// 	duration: 1000
						// })
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #f5f5f5!important;
		padding-top: 200rpx;
		font-family: Demibold;
	}
</style>
